package cn.imvc.app.controllers.member;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Commission;
import cn.imvc.app.entities.DealerApply;
import cn.imvc.app.entities.GoodsOrder;
import cn.imvc.app.models.CommissionModel;
import cn.imvc.app.models.GoodsOrderModel;
import cn.imvc.data.domain.ViewRequest;

//TODO wujx
public class CommissionControllerImpl implements CommissionController {
	@Autowired
	private GoodsOrderModel goodsOrderModel;
	@Autowired
	private CommissionModel commissionModel;
	public Page<Commission> page;
	public ViewRequest viewRequest;
	private int id;
	
	public String search() {
		// TODO Auto-generated method stub
		return null;
	}
	
	/**
	 * 主要是分佣纪录的搜索查询已经其他信息的关联查询
	 * 查询：可以通过会员名、会员手机号、起止时间来查询、分佣类别、订单编号来关联查询分佣记录。
	 */
	public String index() {
		page = commissionModel.findAll(viewRequest);
		return "commission/index";
	}
	
	/**
	 * 通过用户id查找分佣表
	 */
	public String show() {
		page = commissionModel.findAllByMemberId(viewRequest,id);
		return "commission/dialog";
	}

	public String editNew() {
		// TODO Auto-generated method stub
		return null;
	}

	public String create() {
		// TODO Auto-generated method stub
		return null;
	}

	public String edit() {
		// TODO Auto-generated method stub
		return null;
	}

	public String update() {
		// TODO Auto-generated method stub
		return null;
	}

	public String destroy() {
		// TODO Auto-generated method stub
		return null;
	}

	public String destroyBatch() {
		// TODO Auto-generated method stub
		return null;
	}


	public ViewRequest getViewRequest() {
		return viewRequest;
	}


	public void setViewRequest(ViewRequest viewRequest) {
		this.viewRequest = viewRequest;
	}


	public Page<Commission> getPage() {
		return page;
	}


	public void setPage(Page<Commission> page) {
		this.page = page;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}

}
